package com.demo.fruit;

/**
 * 苹果
 */
public class AppleFruit extends Fruit{

    // 单价
    private double price = 8.0;

    public AppleFruit(String name, int num) {
        super(name, num);
    }

    @Override
    public double getCost() {
        return price * num;
    }
}
